package com.spa.application.dto.admin;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.spa.application.converter.AddTianConverter;
import com.spa.application.converter.IsDelConverter;
import com.spa.application.converter.RuleConverter;
import com.spa.application.dto.common.rule.RuleDto;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@JsonInclude
public class ShopExportDTO {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ExcelProperty(value = "ID")
    @ColumnWidth(15)
    private String id;


    @ExcelProperty(value = "门店名称")
    @ColumnWidth(20)
    private String name;

    @ExcelProperty(value = "所在城市")
    @ColumnWidth(15)
    private String cityName;

    @ExcelProperty(value = "负责人")
    @ColumnWidth(15)
    private String owner;

    @ExcelProperty(value = "负责人电话")
    @ColumnWidth(15)
    private String phone;

    @ExcelProperty(value = "提现周期（天）",converter = AddTianConverter.class)
    @ColumnWidth(15)
    private Integer withdrawPeriod;

    @ExcelProperty(value = "门店地址")
    @ColumnWidth(30)
    private String address;

    @ExcelProperty(value = "门店介绍")
    @ColumnWidth(40)
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "创建时间")
    @ColumnWidth(20)
    private Date createTime;

    @ExcelProperty(value = "是否下架",converter = IsDelConverter.class)
    private Integer isDel;

    @ExcelIgnore
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long cityId;

    @ExcelProperty(value = "规则",converter = RuleConverter.class)
    @ColumnWidth(50)
    private List<RuleDto> ruleDtoList;

}
